package com.xuecheng.base.exception;

/**
 * @author :chenjie
 * @date :Created 2023/2/4 13:37
 */
public class XueChengPlusException extends RuntimeException{
    private String errMessage;



    public XueChengPlusException() {
        super();
    }

    public XueChengPlusException(String message) {
        super(message);
        this.errMessage = message;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public static void cast(String errMessage){
        throw new XueChengPlusException(errMessage);
    }
    public static void cast(CommonError commonError){
        throw new XueChengPlusException(commonError.getErrMessage());
    }
}
